package com.lincolnXmypcqq.cmds.framework;

import lombok.Data;

import java.lang.reflect.Method;

/**
 * @author ziyao.peng01@ucarinc.com
 * @description 消息自动回复总结包,将注解的信息收集起来
 * @date 2018/11/20 14:42
 **/
@Data
public class RobotCmd {
    /**
     * 注解到的class
     */
    private Class clazz;

    /**
     * 对应的校验方法
     */
    private Method verify;
    /**
     * 对应的执行语句
     */
    private Method done;
    /**
     * 是否独立执行
     */
    private boolean single;
    /**
     * 优先级
     */
    private int priority;

    public RobotCmd copy(){
        RobotCmd robotCmd = new RobotCmd();
        robotCmd.setClazz(this.clazz);
        robotCmd.setVerify(this.verify);
        robotCmd.setDone(this.done);
        robotCmd.setSingle(this.single);
        robotCmd.setPriority(this.priority);
        return robotCmd;
    }
}
